import {
  getCategoryList,
  createCategory,
  updateCategory,
  deleteCategory,
  changeCategoryStatus,
  setSort,
  getShowPlts,
  getPltCateCount,
} from '@/services/ProductCategory';

export default () => {

  // 商品品类列表
  const GetCategoryList = (params: any) => {
    return getCategoryList(params);
  };

  // 添加商品品类
  const CreateCategory = (data: any) => {
    return createCategory(data);
  };

  // 修改商品品类
  const UpdateCategory = (data: any) => {
    return updateCategory(data);
  };

  // 删除商品品类
  const DeleteCategory = (params: any) => {
    return deleteCategory(params);
  };

  // 修改商品品类状态
  const ChangeCategoryStatus = (params: any) => {
    return changeCategoryStatus(params);
  };

  // 排序
  const SetSort = (params: any) => {
    return setSort(params);
  };

  // 获取渠道
  const GetShowPlts = (params: any) => {
    return getShowPlts(params);
  };

  // 获取渠道统计数量
  const GetPltCateCount = (params: any) => {
    return getPltCateCount(params);
  };

  return {
    GetCategoryList,
    CreateCategory,
    UpdateCategory,
    DeleteCategory,
    ChangeCategoryStatus,
    SetSort,
    GetShowPlts,
    GetPltCateCount,
  };
};
